<div class="form">

<?php $form = $this->beginWidget('CActiveForm', array(
        'id' => 'user-form',
        'enableClientValidation'=>true,
        'enableAjaxValidation' => false,
        ));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model, 'username'); ?>
		<?php echo $form->textField($model, 'username', array('cols' => 50)); ?>
		<?php echo $form->error($model, 'username'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'password'); ?>
		<?php echo $form->passwordField($model, 'password', array('cols' => 50)); ?>
		<?php echo $form->error($model, 'password'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'repassword'); ?>
		<?php echo $form->passwordField($model, 'repassword', array('cols' => 50)); ?>
		<?php echo $form->error($model, 'repassword'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'fullname'); ?>
		<?php echo $form->textField($model, 'fullname', array('cols' => 50)); ?>
		<?php echo $form->error($model, 'fullname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'email'); ?>
		<?php echo $form->textField($model, 'email', array('cols' => 50)); ?>
		<?php echo $form->error($model, 'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'birthdate'); ?>
		<?php echo ExcHtml::activeDateField($model, 'birthdate', array(), array('date'=>'Ngày ', 'month'=>' Tháng ', 'year'=>' Năm '));?>
		<?php echo $form->error($model, 'birthdate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'role'); ?>
		<?php echo $form->dropDownList($model, 'role', $this->getRoleOptions()); ?>
		<?php echo $form->error($model, 'role'); ?>
	</div>

	<?php if(CCaptcha::checkRequirements()): ?>
	<div class="row">
		<?php echo $form->labelEx($model,'verifyCode'); ?>
		<div>
		<?php $this->widget('CCaptcha'); ?>
		<?php echo $form->textField($model,'verifyCode'); ?>
		</div>
		<div class="hint">Please enter the letters as they are shown in the image above.
		<br/>Letters are not case-sensitive.</div>
		<?php echo $form->error($model,'verifyCode'); ?>
	</div>
	<?php endif; ?>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->